package com.digital.smartgrow.common.config.mybatis;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
* @Description: mybatis-plus分页配置
*/
@Configuration
public class MybatisPlusConfig {

    /**
     * 分页插件(有效),用MybatisPlusInterceptor及PaginationInnerInterceptor不生效
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setDbType(DbType.MYSQL);
        return paginationInterceptor;
    }


}
